﻿<phone:PhoneApplicationPage
    x:Class="Photonware.RestUI.SL8.Xamls.UserCaseExecutionPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True"
    toolkit:TiltEffect.IsTiltEnabled="True">

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="125"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Background="DodgerBlue" Height="125" VerticalAlignment="Top">
        </Grid>
        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel Grid.Row="0">
            <TextBlock Text="{Binding Title}" Margin="25,20,0,-20" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="Execution Result" Margin="30,20,0,0" FontSize="45" Foreground="White"/>
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ListBox x:Name="actionList" Margin="0,0,-12,0" ItemsSource="{Binding ExecutionActions}" Foreground="White" Tap="actionList_Tap" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Border BorderThickness="0,0,0,1" BorderBrush="LightGray" Background="{x:Null}">
                            <StackPanel Margin="12,10,0,10" toolkit:TiltEffect.SuppressTilt="False" >
                                <TextBlock Text="{Binding Text}" TextWrapping="NoWrap" Style="{StaticResource PhoneTextNormalStyle}" Foreground="Black"/>
                                <TextBlock Text="{Binding StatusText}" TextWrapping="NoWrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" Foreground="Gray"/>
                            </StackPanel>
                        </Border>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="newButton" IconUri="/Assets/Cancel.png" Text="stop"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>